package com.bite.judge.test;

import java.util.Arrays;
import java.util.Locale;

public class Solution {


    public String mergeArrays(int[] arr1, int[] arr2) {
        System.out.print(Arrays.toString(arr1) + " ");
        System.out.print(Arrays.toString(arr2));
        return "";
    }

    public static void main(String[] args) {
        int n = Integer.parseInt(args[0]);
        int[] arr1 = new int[n];
        for (int i = 0; i < n; i++) {
            arr1[i] = Integer.parseInt(args[1 + i]);
        }
        int m = Integer.parseInt(args[1 + n]);
        int[] arr2 = new int[m];
        for (int i = 0; i < m; i++) {
            arr2[i] = Integer.parseInt(args[2 + n + i]);
        }
        Solution solution = new Solution();
        String result = solution.mergeArrays(arr1, arr2);
        System.out.println(result);
    }
}
